package rmaqlc31.basic;

import java.util.Scanner;

public class P236_Q5 {

	public static void main(String[] args) {
		
		Add i = new Add();
		Sub j = new Sub();
		Mul k = new Mul();
		Div l = new Div();
		int m, n;
		String o;
		
		Scanner sc = new Scanner(System.in);
		
		System.out.print("두 정수와 연산자를 입력하시오>> ");
		m = sc.nextInt();
		n = sc.nextInt();
		o = sc.next();
		
		if(o.equals("+")){
			i.setValue(m, n);
			System.out.println("+값 : "+i.calculate());
		}
		else if(o.equals("-")){
			j.setValue(m, n);
			System.out.println("-값 : "+j.calculate());
		}
		else if(o.equals("*")){
			k.setValue(m, n);
			System.out.println("*값 : "+k.calculate());
		}
		else if(o.equals("/")){
			l.setValue(m, n);
			System.out.println("/값 : "+l.calculate());
		}
		
		sc.close();
	}

}

class Add {
	int a, b, Add;
	void setValue(int a, int b){
		this.a=a;
		this.b=b;
	}
	int calculate(){
		Add = a+b;
		return Add;
	}
}

class Sub {
	int a, b, Sub;
	void setValue(int a, int b){
		this.a=a;
		this.b=b;
	}
	int calculate(){
		Sub = a-b;
		return Sub;
	}
}

class Mul {
	int a, b, Mul;
	void setValue(int a, int b){
		this.a=a;
		this.b=b;
	}
	int calculate(){
		Mul = a*b;
		return Mul;
	}
}

class Div {
	double a, b, Div;
	void setValue(double a, double b){
		this.a=a;
		this.b=b;
	}
	double calculate(){
		Div = a/b;
		return Div;
	}
}
